﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Interviewer/MasterPageInterviewer.master" AutoEventWireup="true" CodeFile="SendEmailNoticeHired.aspx.cs" Inherits="Interviewer_SendEmailNoticeHired" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script type="text/javascript" src="../Scripts/jquery.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#<%=btnSave.ClientID %>').attr('disabled', true);
            function HideShowButton() {
                if ($('#<%=txtDate.ClientID %>').val() == "") {
                    $('#<%=lblErrorDate.ClientID %>').html("(*)");
                }
                else if ($('#<%=txtTime.ClientID %>').val() == "") {
                    $('#<%=lblErrorDate.ClientID %>').html("");
                    $('#<%=lblErrorTime.ClientID %>').html("(*)");
                }
                else if ($('#<%=txtAddress.ClientID %>').val() == "") {
                    $('#<%=lblErrorTime.ClientID %>').html("");
                    $('#<%=lblErrorAddress.ClientID %>').html("(*)");
                }
                else {
                    $('#<%=lblErrorDate.ClientID %>').html("");
                    $('#<%=lblErrorTime.ClientID %>').html("");
                    $('#<%=lblErrorAddress.ClientID %>').html("");
                    $('#<%=btnSave.ClientID %>').attr('disabled', false);
                }
            }
            $('#<%=txtDate.ClientID %>').blur(function () {
                HideShowButton();
            });
            $('#<%=txtTime.ClientID %>').blur(function () {
                HideShowButton();
            });
            $('#<%=txtAddress.ClientID %>').blur(function () {
                HideShowButton();
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentmain" Runat="Server">
    <div id="Main">
        <h2 style="font-size:20px;">Send the applicant's work schedule has been hired<asp:ToolkitScriptManager 
                ID="ToolkitScriptManager1" runat="server">
            </asp:ToolkitScriptManager>
        </h2>
        <p class="LineOdd">
            <asp:Label ID="Label1" runat="server" Text="Working days:" Width="150px" CssClass="lblTitleCss"></asp:Label>
            <asp:TextBox ID="txtDate" runat="server" Width="200px"></asp:TextBox>
            <asp:CalendarExtender ID="txtDate_CalendarExtender" runat="server" 
                TargetControlID="txtDate">
            </asp:CalendarExtender>
            <asp:Label ID="lblErrorDate" runat="server" ForeColor="Red"></asp:Label>
        </p>
        <p>
            <asp:Label ID="Label2" runat="server" Text="Working time:" Width="150px" CssClass="lblTitleCss"></asp:Label>
            <asp:TextBox ID="txtTime" runat="server" Width="200px"></asp:TextBox>
            <asp:Label ID="lblErrorTime" runat="server" ForeColor="Red"></asp:Label>
        </p>
        <p class="LineOdd" style="height:45px">
            <asp:Label ID="Label3" runat="server" Text="Working place:" Width="150px" CssClass="lblTitleCss"></asp:Label>
            <asp:TextBox ID="txtAddress" runat="server" Width="200px" TextMode="MultiLine" 
                Height="40px"></asp:TextBox>
            <asp:Label ID="lblErrorAddress" runat="server" ForeColor="Red"></asp:Label>
        </p>
        <p>
            <asp:Button ID="btnSave" runat="server" Text="Send Email" Height="30px" 
                Width="100px" CssClass="btnSearch" onclick="btnSave_Click" />
            <asp:Button ID="btnSaveLast" runat="server" Text="Send Last" Height="30px" 
                Width="100px" CssClass="btnSearch" 
                PostBackUrl="~/Interviewer/ApplicantManager.aspx" 
                onclick="btnSaveLast_Click" />
        </p>
        <p>
            <asp:Label ID="lblSuccess" runat="server" ForeColor="Blue"></asp:Label>
            <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
        </p>
    </div>
</asp:Content>

